
<h1><span class="yiyi-st" id="yiyi-23">Mathematical functions</span></h1>
        <blockquote>
        <p>原文：<a href="https://docs.scipy.org/doc/numpy/reference/routines.math.html">https://docs.scipy.org/doc/numpy/reference/routines.math.html</a></p>
        <p>译者：<a href="https://github.com/wizardforcel">飞龙</a> <a href="http://usyiyi.cn/">UsyiyiCN</a></p>
        <p>校对：（虚位以待）</p>
        </blockquote>
    
<div class="section" id="trigonometric-functions">
<h2><span class="yiyi-st" id="yiyi-24">Trigonometric functions</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-25"><a class="reference internal" href="generated/numpy.sin.html#numpy.sin" title="numpy.sin"><code class="xref py py-obj docutils literal"><span class="pre">sin</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-26">三角正弦，元素。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-27"><a class="reference internal" href="generated/numpy.cos.html#numpy.cos" title="numpy.cos"><code class="xref py py-obj docutils literal"><span class="pre">cos</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-28">元素方面。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-29"><a class="reference internal" href="generated/numpy.tan.html#numpy.tan" title="numpy.tan"><code class="xref py py-obj docutils literal"><span class="pre">tan</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-30">逐元素计算切线。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-31"><a class="reference internal" href="generated/numpy.arcsin.html#numpy.arcsin" title="numpy.arcsin"><code class="xref py py-obj docutils literal"><span class="pre">arcsin</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-32">反正弦，元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-33"><a class="reference internal" href="generated/numpy.arccos.html#numpy.arccos" title="numpy.arccos"><code class="xref py py-obj docutils literal"><span class="pre">arccos</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-34">三角反余弦，元素方式。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-35"><a class="reference internal" href="generated/numpy.arctan.html#numpy.arctan" title="numpy.arctan"><code class="xref py py-obj docutils literal"><span class="pre">arctan</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-36">三角反正切，元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-37"><a class="reference internal" href="generated/numpy.hypot.html#numpy.hypot" title="numpy.hypot"><code class="xref py py-obj docutils literal"><span class="pre">hypot</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-38">给定直角三角形的“腿”，返回其斜边。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-39"><a class="reference internal" href="generated/numpy.arctan2.html#numpy.arctan2" title="numpy.arctan2"><code class="xref py py-obj docutils literal"><span class="pre">arctan2</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-40"><code class="docutils literal"><span class="pre">x1/x2</span></code>的元素平方倒圆切线正确选择象限。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-41"><a class="reference internal" href="generated/numpy.degrees.html#numpy.degrees" title="numpy.degrees"><code class="xref py py-obj docutils literal"><span class="pre">degrees</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-42">将角度从弧度转换为度。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-43"><a class="reference internal" href="generated/numpy.radians.html#numpy.radians" title="numpy.radians"><code class="xref py py-obj docutils literal"><span class="pre">radians</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-44">将角度从度转换为弧度。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-45"><a class="reference internal" href="generated/numpy.unwrap.html#numpy.unwrap" title="numpy.unwrap"><code class="xref py py-obj docutils literal"><span class="pre">unwrap</span></code></a>（p [，discont，axis]）</span></td>
<td><span class="yiyi-st" id="yiyi-46">通过将值之间的delta改为2 * pi补码来展开。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-47"><a class="reference internal" href="generated/numpy.deg2rad.html#numpy.deg2rad" title="numpy.deg2rad"><code class="xref py py-obj docutils literal"><span class="pre">deg2rad</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-48">将角度从度转换为弧度。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-49"><a class="reference internal" href="generated/numpy.rad2deg.html#numpy.rad2deg" title="numpy.rad2deg"><code class="xref py py-obj docutils literal"><span class="pre">rad2deg</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-50">将角度从弧度转换为度。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="hyperbolic-functions">
<h2><span class="yiyi-st" id="yiyi-51">Hyperbolic functions</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-52"><a class="reference internal" href="generated/numpy.sinh.html#numpy.sinh" title="numpy.sinh"><code class="xref py py-obj docutils literal"><span class="pre">sinh</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-53">双曲正弦，元素。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-54"><a class="reference internal" href="generated/numpy.cosh.html#numpy.cosh" title="numpy.cosh"><code class="xref py py-obj docutils literal"><span class="pre">cosh</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-55">双曲余弦，元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-56"><a class="reference internal" href="generated/numpy.tanh.html#numpy.tanh" title="numpy.tanh"><code class="xref py py-obj docutils literal"><span class="pre">tanh</span></code></a>(x[, out])</span></td>
<td><span class="yiyi-st" id="yiyi-57">逐元素计算双曲正切。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-58"><a class="reference internal" href="generated/numpy.arcsinh.html#numpy.arcsinh" title="numpy.arcsinh"><code class="xref py py-obj docutils literal"><span class="pre">arcsinh</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-59">逆双曲正弦元。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-60"><a class="reference internal" href="generated/numpy.arccosh.html#numpy.arccosh" title="numpy.arccosh"><code class="xref py py-obj docutils literal"><span class="pre">arccosh</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-61">逆双曲余弦，元素方式。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-62"><a class="reference internal" href="generated/numpy.arctanh.html#numpy.arctanh" title="numpy.arctanh"><code class="xref py py-obj docutils literal"><span class="pre">arctanh</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-63">逆双曲正切元素。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="rounding">
<h2><span class="yiyi-st" id="yiyi-64">Rounding</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-65"><a class="reference internal" href="generated/numpy.around.html#numpy.around" title="numpy.around"><code class="xref py py-obj docutils literal"><span class="pre">around</span></code></a>（a [，decimals，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-66">均匀到给定的小数位数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-67"><a class="reference internal" href="generated/numpy.round_.html#numpy.round_" title="numpy.round_"><code class="xref py py-obj docutils literal"><span class="pre">round_</span></code></a>（a [，decimals，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-68">将数组舍入到给定的小数位数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-69"><a class="reference internal" href="generated/numpy.rint.html#numpy.rint" title="numpy.rint"><code class="xref py py-obj docutils literal"><span class="pre">rint</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-70">数组的圆形元素到最接近的整数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-71"><a class="reference internal" href="generated/numpy.fix.html#numpy.fix" title="numpy.fix"><code class="xref py py-obj docutils literal"><span class="pre">fix</span></code></a>（x [，y]）</span></td>
<td><span class="yiyi-st" id="yiyi-72">向零舍入到最接近的整数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-73"><a class="reference internal" href="generated/numpy.floor.html#numpy.floor" title="numpy.floor"><code class="xref py py-obj docutils literal"><span class="pre">floor</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-74">逐元素地返回输入的底。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-75"><a class="reference internal" href="generated/numpy.ceil.html#numpy.ceil" title="numpy.ceil"><code class="xref py py-obj docutils literal"><span class="pre">ceil</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-76">元素方式返回输入的上限。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-77"><a class="reference internal" href="generated/numpy.trunc.html#numpy.trunc" title="numpy.trunc"><code class="xref py py-obj docutils literal"><span class="pre">trunc</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-78">按元素方式返回输入的截断值。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="sums-products-differences">
<h2><span class="yiyi-st" id="yiyi-79">Sums, products, differences</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-80"><a class="reference internal" href="generated/numpy.prod.html#numpy.prod" title="numpy.prod"><code class="xref py py-obj docutils literal"><span class="pre">prod</span></code></a>（a [，axis，dtype，out，keepdims]）</span></td>
<td><span class="yiyi-st" id="yiyi-81">返回给定轴上的数组元素的乘积。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-82"><a class="reference internal" href="generated/numpy.sum.html#numpy.sum" title="numpy.sum"><code class="xref py py-obj docutils literal"><span class="pre">sum</span></code></a>（a [，axis，dtype，out，keepdims]）</span></td>
<td><span class="yiyi-st" id="yiyi-83">给定轴上的数组元素的总和。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-84"><a class="reference internal" href="generated/numpy.nanprod.html#numpy.nanprod" title="numpy.nanprod"><code class="xref py py-obj docutils literal"><span class="pre">nanprod</span></code></a>（a [，axis，dtype，out，keepdims]）</span></td>
<td><span class="yiyi-st" id="yiyi-85">返回数组元素在给定轴上的处理非数字（NaN）为零的乘积。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-86"><a class="reference internal" href="generated/numpy.nansum.html#numpy.nansum" title="numpy.nansum"><code class="xref py py-obj docutils literal"><span class="pre">nansum</span></code></a>（a [，axis，dtype，out，keepdims]）</span></td>
<td><span class="yiyi-st" id="yiyi-87">返回在给定轴上处理非数字（NaN）为零的数组元素的总和。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-88"><a class="reference internal" href="generated/numpy.cumprod.html#numpy.cumprod" title="numpy.cumprod"><code class="xref py py-obj docutils literal"><span class="pre">cumprod</span></code></a>（a [，axis，dtype，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-89">返回沿给定轴的元素的累积积。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-90"><a class="reference internal" href="generated/numpy.cumsum.html#numpy.cumsum" title="numpy.cumsum"><code class="xref py py-obj docutils literal"><span class="pre">cumsum</span></code></a>（a [，axis，dtype，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-91">返回沿给定轴的元素的累积和。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-92"><code class="xref py py-obj docutils literal"><span class="pre">nancumprod</span></code></span></td>
<td></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-93"><code class="xref py py-obj docutils literal"><span class="pre">nancumsum</span></code></span></td>
<td></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-94"><a class="reference internal" href="generated/numpy.diff.html#numpy.diff" title="numpy.diff"><code class="xref py py-obj docutils literal"><span class="pre">diff</span></code></a>（a [，n，axis]）</span></td>
<td><span class="yiyi-st" id="yiyi-95">计算沿给定轴的第n个离散差分。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-96"><a class="reference internal" href="generated/numpy.ediff1d.html#numpy.ediff1d" title="numpy.ediff1d"><code class="xref py py-obj docutils literal"><span class="pre">ediff1d</span></code></a>（ary [，to_end，to_begin]）</span></td>
<td><span class="yiyi-st" id="yiyi-97">数组的连续元素之间的差异。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-98"><a class="reference internal" href="generated/numpy.gradient.html#numpy.gradient" title="numpy.gradient"><code class="xref py py-obj docutils literal"><span class="pre">gradient</span></code></a>（f，\ * varargs，\ * \ * kwargs）</span></td>
<td><span class="yiyi-st" id="yiyi-99">返回N维数组的梯度。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-100"><a class="reference internal" href="generated/numpy.cross.html#numpy.cross" title="numpy.cross"><code class="xref py py-obj docutils literal"><span class="pre">cross</span></code></a>（a，b [，axisa，axisb，axisc，axis]）</span></td>
<td><span class="yiyi-st" id="yiyi-101">返回两个（数组）向量的叉积。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-102"><a class="reference internal" href="generated/numpy.trapz.html#numpy.trapz" title="numpy.trapz"><code class="xref py py-obj docutils literal"><span class="pre">trapz</span></code></a>（y [，x，dx，axis]）</span></td>
<td><span class="yiyi-st" id="yiyi-103">使用复合梯形法则沿给定轴进行积分。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="exponents-and-logarithms">
<h2><span class="yiyi-st" id="yiyi-104">Exponents and logarithms</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-105"><a class="reference internal" href="generated/numpy.exp.html#numpy.exp" title="numpy.exp"><code class="xref py py-obj docutils literal"><span class="pre">exp</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-106">计算输入数组中所有元素的指数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-107"><a class="reference internal" href="generated/numpy.expm1.html#numpy.expm1" title="numpy.expm1"><code class="xref py py-obj docutils literal"><span class="pre">expm1</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-108">对数组中的所有元素计算<code class="docutils literal"><span class="pre">exp（x）</span> <span class="pre"> - </span> <span class="pre">1</span> </code></span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-109"><a class="reference internal" href="generated/numpy.exp2.html#numpy.exp2" title="numpy.exp2"><code class="xref py py-obj docutils literal"><span class="pre">exp2</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-110">对于输入数组中的所有<em class="xref py py-obj">p</em>，计算<em class="xref py py-obj">2 ** p</em>。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-111"><a class="reference internal" href="generated/numpy.log.html#numpy.log" title="numpy.log"><code class="xref py py-obj docutils literal"><span class="pre">log</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-112">自然对数，逐元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-113"><a class="reference internal" href="generated/numpy.log10.html#numpy.log10" title="numpy.log10"><code class="xref py py-obj docutils literal"><span class="pre">log10</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-114">以元素为单位返回输入数组的基数10的对数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-115"><a class="reference internal" href="generated/numpy.log2.html#numpy.log2" title="numpy.log2"><code class="xref py py-obj docutils literal"><span class="pre">log2</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-116"><em class="xref py py-obj">x</em>的基础2对数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-117"><a class="reference internal" href="generated/numpy.log1p.html#numpy.log1p" title="numpy.log1p"><code class="xref py py-obj docutils literal"><span class="pre">log1p</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-118">返回一个加自然对数的输入数组，元素。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-119"><a class="reference internal" href="generated/numpy.logaddexp.html#numpy.logaddexp" title="numpy.logaddexp"><code class="xref py py-obj docutils literal"><span class="pre">logaddexp</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-120">输入的求和的对数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-121"><a class="reference internal" href="generated/numpy.logaddexp2.html#numpy.logaddexp2" title="numpy.logaddexp2"><code class="xref py py-obj docutils literal"><span class="pre">logaddexp2</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-122">以2为底的输入的乘方和的对数。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="other-special-functions">
<h2><span class="yiyi-st" id="yiyi-123">Other special functions</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-124"><a class="reference internal" href="generated/numpy.i0.html#numpy.i0" title="numpy.i0"><code class="xref py py-obj docutils literal"><span class="pre">i0</span></code></a>（x）</span></td>
<td><span class="yiyi-st" id="yiyi-125">修改Bessel函数的第一类，顺序为0。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-126"><a class="reference internal" href="generated/numpy.sinc.html#numpy.sinc" title="numpy.sinc"><code class="xref py py-obj docutils literal"><span class="pre">sinc</span></code></a>（x）</span></td>
<td><span class="yiyi-st" id="yiyi-127">返回sinc函数。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="floating-point-routines">
<h2><span class="yiyi-st" id="yiyi-128">Floating point routines</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-129"><a class="reference internal" href="generated/numpy.signbit.html#numpy.signbit" title="numpy.signbit"><code class="xref py py-obj docutils literal"><span class="pre">signbit</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-130">以元素为单位返回True，其中signbit已设置（小于零）。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-131"><a class="reference internal" href="generated/numpy.copysign.html#numpy.copysign" title="numpy.copysign"><code class="xref py py-obj docutils literal"><span class="pre">copysign</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-132">按照元素方式将x1的符号更改为x2的符号。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-133"><a class="reference internal" href="generated/numpy.frexp.html#numpy.frexp" title="numpy.frexp"><code class="xref py py-obj docutils literal"><span class="pre">frexp</span></code></a>（x [，out1，out2]）</span></td>
<td><span class="yiyi-st" id="yiyi-134">将x的元素分解为尾数和二进制指数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-135"><a class="reference internal" href="generated/numpy.ldexp.html#numpy.ldexp" title="numpy.ldexp"><code class="xref py py-obj docutils literal"><span class="pre">ldexp</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-136">元素方式返回x1 * 2 ** x2。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="arithmetic-operations">
<h2><span class="yiyi-st" id="yiyi-137">Arithmetic operations</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-138"><a class="reference internal" href="generated/numpy.add.html#numpy.add" title="numpy.add"><code class="xref py py-obj docutils literal"><span class="pre">add</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-139">按元素添加参数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-140"><a class="reference internal" href="generated/numpy.reciprocal.html#numpy.reciprocal" title="numpy.reciprocal"><code class="xref py py-obj docutils literal"><span class="pre">reciprocal</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-141">元素方式返回参数的倒数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-142"><a class="reference internal" href="generated/numpy.negative.html#numpy.negative" title="numpy.negative"><code class="xref py py-obj docutils literal"><span class="pre">negative</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-143">数值负，元素。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-144"><a class="reference internal" href="generated/numpy.multiply.html#numpy.multiply" title="numpy.multiply"><code class="xref py py-obj docutils literal"><span class="pre">multiply</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-145">逐元素乘法参数。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-146"><a class="reference internal" href="generated/numpy.divide.html#numpy.divide" title="numpy.divide"><code class="xref py py-obj docutils literal"><span class="pre">divide</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-147">逐元素分割参数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-148"><a class="reference internal" href="generated/numpy.power.html#numpy.power" title="numpy.power"><code class="xref py py-obj docutils literal"><span class="pre">power</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-149">第一个数组元素从第二个数组提升到权力，逐元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-150"><a class="reference internal" href="generated/numpy.subtract.html#numpy.subtract" title="numpy.subtract"><code class="xref py py-obj docutils literal"><span class="pre">subtract</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-151">按元素方式减去参数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-152"><a class="reference internal" href="generated/numpy.true_divide.html#numpy.true_divide" title="numpy.true_divide"><code class="xref py py-obj docutils literal"><span class="pre">true_divide</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-153">按元素方式返回输入的真正除法。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-154"><a class="reference internal" href="generated/numpy.floor_divide.html#numpy.floor_divide" title="numpy.floor_divide"><code class="xref py py-obj docutils literal"><span class="pre">floor_divide</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-155">返回小于或等于输入的除法的最大整数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-156"><a class="reference internal" href="generated/numpy.fmod.html#numpy.fmod" title="numpy.fmod"><code class="xref py py-obj docutils literal"><span class="pre">fmod</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-157">返回除法的元素余项。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-158"><a class="reference internal" href="generated/numpy.mod.html#numpy.mod" title="numpy.mod"><code class="xref py py-obj docutils literal"><span class="pre">mod</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-159">返回元素的除法余数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-160"><a class="reference internal" href="generated/numpy.modf.html#numpy.modf" title="numpy.modf"><code class="xref py py-obj docutils literal"><span class="pre">modf</span></code></a>（x [，out1，out2]）</span></td>
<td><span class="yiyi-st" id="yiyi-161">以元素方式返回数组的小数和整数部分。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-162"><a class="reference internal" href="generated/numpy.remainder.html#numpy.remainder" title="numpy.remainder"><code class="xref py py-obj docutils literal"><span class="pre">remainder</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-163">返回元素的除法余数。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="handling-complex-numbers">
<h2><span class="yiyi-st" id="yiyi-164">Handling complex numbers</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-165"><a class="reference internal" href="generated/numpy.angle.html#numpy.angle" title="numpy.angle"><code class="xref py py-obj docutils literal"><span class="pre">angle</span></code></a>（z [，deg]）</span></td>
<td><span class="yiyi-st" id="yiyi-166">返回复参数的角度。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-167"><a class="reference internal" href="generated/numpy.real.html#numpy.real" title="numpy.real"><code class="xref py py-obj docutils literal"><span class="pre">real</span></code></a>（val）</span></td>
<td><span class="yiyi-st" id="yiyi-168">返回数组的元素的实数部分。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-169"><a class="reference internal" href="generated/numpy.imag.html#numpy.imag" title="numpy.imag"><code class="xref py py-obj docutils literal"><span class="pre">imag</span></code></a>（val）</span></td>
<td><span class="yiyi-st" id="yiyi-170">返回数组的元素的虚部。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-171"><a class="reference internal" href="generated/numpy.conj.html#numpy.conj" title="numpy.conj"><code class="xref py py-obj docutils literal"><span class="pre">conj</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-172">按元素方式返回复共轭。</span></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="miscellaneous">
<h2><span class="yiyi-st" id="yiyi-173">Miscellaneous</span></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-174"><a class="reference internal" href="generated/numpy.convolve.html#numpy.convolve" title="numpy.convolve"><code class="xref py py-obj docutils literal"><span class="pre">convolve</span></code></a>（a，v [，mode]）</span></td>
<td><span class="yiyi-st" id="yiyi-175">返回两个一维序列的离散，线性卷积。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-176"><a class="reference internal" href="generated/numpy.clip.html#numpy.clip" title="numpy.clip"><code class="xref py py-obj docutils literal"><span class="pre">clip</span></code></a>（a，a_min，a_max [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-177">剪辑（限制）数组中的值。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-178"><a class="reference internal" href="generated/numpy.sqrt.html#numpy.sqrt" title="numpy.sqrt"><code class="xref py py-obj docutils literal"><span class="pre">sqrt</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-179">按元素方式返回数组的正平方根。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-180"><a class="reference internal" href="generated/numpy.cbrt.html#numpy.cbrt" title="numpy.cbrt"><code class="xref py py-obj docutils literal"><span class="pre">cbrt</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-181">以元素方式返回数组的多维数据集根。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-182"><a class="reference internal" href="generated/numpy.square.html#numpy.square" title="numpy.square"><code class="xref py py-obj docutils literal"><span class="pre">square</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-183">返回输入的元素平方。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-184"><a class="reference internal" href="generated/numpy.absolute.html#numpy.absolute" title="numpy.absolute"><code class="xref py py-obj docutils literal"><span class="pre">absolute</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-185">逐个计算绝对值。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-186"><a class="reference internal" href="generated/numpy.fabs.html#numpy.fabs" title="numpy.fabs"><code class="xref py py-obj docutils literal"><span class="pre">fabs</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-187">按元素计算绝对值。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-188"><a class="reference internal" href="generated/numpy.sign.html#numpy.sign" title="numpy.sign"><code class="xref py py-obj docutils literal"><span class="pre">sign</span></code></a>（x [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-189">返回数字符号的逐元素指示。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-190"><a class="reference internal" href="generated/numpy.maximum.html#numpy.maximum" title="numpy.maximum"><code class="xref py py-obj docutils literal"><span class="pre">maximum</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-191">数组元素的元素最大值。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-192"><a class="reference internal" href="generated/numpy.minimum.html#numpy.minimum" title="numpy.minimum"><code class="xref py py-obj docutils literal"><span class="pre">minimum</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-193">元素最小的数组元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-194"><a class="reference internal" href="generated/numpy.fmax.html#numpy.fmax" title="numpy.fmax"><code class="xref py py-obj docutils literal"><span class="pre">fmax</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-195">数组元素的元素最大值。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-196"><a class="reference internal" href="generated/numpy.fmin.html#numpy.fmin" title="numpy.fmin"><code class="xref py py-obj docutils literal"><span class="pre">fmin</span></code></a>（x1，x2 [，out]）</span></td>
<td><span class="yiyi-st" id="yiyi-197">元素最小的数组元素。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-198"><a class="reference internal" href="generated/numpy.nan_to_num.html#numpy.nan_to_num" title="numpy.nan_to_num"><code class="xref py py-obj docutils literal"><span class="pre">nan_to_num</span></code></a>（x）</span></td>
<td><span class="yiyi-st" id="yiyi-199">用零和inf替换nan为有限数。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-200"><a class="reference internal" href="generated/numpy.real_if_close.html#numpy.real_if_close" title="numpy.real_if_close"><code class="xref py py-obj docutils literal"><span class="pre">real_if_close</span></code></a>（a [，tol]）</span></td>
<td><span class="yiyi-st" id="yiyi-201">如果复杂的输入返回一个真实的数组，如果复杂的零件接近零。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-202"><a class="reference internal" href="generated/numpy.interp.html#numpy.interp" title="numpy.interp"><code class="xref py py-obj docutils literal"><span class="pre">interp</span></code></a>（x，xp，fp [，left，right，period]）</span></td>
<td><span class="yiyi-st" id="yiyi-203">一维线性插值。</span></td>
</tr>
</tbody>
</table>
</div>
